This snippet shows how you can add a simple extra part to an existing WDEF and be able to do hit testing on the part via FindWindow(). The extra part in this case is on the right side of the title bar, just to the left of where the zoombox would be. When hit, it inverts the window.
-steve falkenburg 12/10/91
WDEF Patch Example II
I decided to add a more consistent behaviour to the added part.
Now it behaves just like the Zoom Box or the Close Box. You can Track it.
Indeed you can decide to make a popup-menu appear at that place, just modify the TrackMyPart routine, and make it a short function and not a Boolean one.
It's easy also to color the smiley icon, and you can also use icon suites there.
I *am* experimenting in this sense for a commercial project. It's fun.
I modified only a few parts of the code.
Now it beeps after tracking and does not invert the window's contents.
Use this code/technique freely, just as you could do with the original snippet.
Huh, I feel that on Quadras it may be safer to flush the caches after the patch installed, check it. It's very unlikely that you encounter problems, but care.
Wrote a workaround for a very FUNNY system's behaviour. Read source file for details.
Discovered (and fixed) after adding a zoom box to the window (not found in the original application and in my first revision).